Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace get/setSex with get/setGender -> master #105

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

ovr
Copy link
Member

@ovr ovr commented Jan 29, 2020

As explained in #94 it's a good idea to use gender instead of sex.

To not break BC the get/setSex are still available but are marked as deprecated. The current functionality works as before. In addition to that it is possible to set other as gender and the default now is to return unknown instead of NULL.

heiglandreas and others added 8 commits September 15, 2019 18:48
As explained in #94 it's a good idea to use gender instead of sex. 

To not break BC the get/setSex are still available but are marked as deprecated. The current functionality works as before. In addition to that it is possible to set `other` as gender and the default now is to return `unknown` instead of NULL.
Such things happen when you try to code in github...
As they are already used removing them is a BC break that we do not want!
This removes the calls to get/setSex with the appropriate get/setGender
calls. Tests are now again passing
The removed docBlock contains redundant information and was therefore
removed
@ovr
Copy link
Member Author

ovr commented Jan 29, 2020

Commented from @heiglandreas

image

I am sorry for noice, but I renamed 3.x branch to mater to protect some unexpected cases...

$gender = self::GENDER_FEMALE;
}

$genders = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this you can also declare a constant of valid values: const VALID_GENDERS = [self::GENDER_MALE, self::GENDER_FEMALE ....]

Copy link
Contributor

@ADmad ADmad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I would prefer if null was used instead of unknown when the value wasn't available from the provider. Seems fine otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants